package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.AdditionalTableDao;
import com.hera.process.config.service.AdditionalService;
import com.hera.process.external.domain.AdditionalTable;


@Service("additionaltableservice")
public class AdditionalServiceImpl implements AdditionalService {

	static final Logger logger = Logger.getLogger(AdditionalServiceImpl.class);
	
	@Autowired
	private AdditionalTableDao additionaldao;
	
	@Override
	public AdditionalTable findById(Long id) {
		
		return additionaldao.findOne(id);
		
	}

	@Override
	public void update(AdditionalTable entity) {
		
		additionaldao.save(entity);
		
	}

	@Override
	public void save(AdditionalTable entity) {
		
		additionaldao.save(entity);
	}

	@Override
	public void delete(AdditionalTable entity) {
		
		additionaldao.delete(entity);
	}

	@Override
	public List<AdditionalTable> findAll() {
		
		return additionaldao.findAll();
	}

	@Override
	public List<AdditionalTable> findAll(FiltroDTO filtroDTO) {
		
		return additionaldao.obtenerEntidadesPorFiltros(filtroDTO);
	}

}
